The Graphics Processing Unit (“GPU”) was developed to offload three-dimensional (“3D”) calculations that had traditionally been performed by the central processing unit (“CPU”). A GPU is generally a processor responsible for performing, at relatively high graphics processing speeds, many or all of the functions of generating graphics, such as defining, positioning, texturizing, shading, and rendering primitives (e.g., polygons, such as triangles). The GPU has allowed developers of digital content to increase the detail and complexity of graphical images (“graphics”) to provide more realism in computer-generated images by, for example, performing real-time rendering of shadow effects using stencil shadow volumes.
A shadow volume typically is a volumetric region of space that represents the shadow generated by a particular occluder for a particular light source. Any object within that volumetric region is considered “shadowed.” Any boundary of a shadow volume defines a point (or plane) in space where an object goes from being unshadowed to shadowed, or vice versa. A stenciled shadow volume is a shadow volume wherein a shadow test uses a stencil buffer to determine if a given point is either inside or outside the shadow volume.
But using stencil shadow volumes have limitations in generating shadow effects. Shadow volume techniques generally require many shadow primitives that collectively consume relatively large amounts of pixel fill rate as well as computational overhead when rendering dynamic scenes. As such, the rendering of shadow effects using shadow volumes consumes more GPU processing capacity, more transmission channel capacity, and more storage than otherwise is desired.
Therefore, there is a need for a method and/or apparatus to accelerate the rendering of shadows for computer-generated scenes. In particular, there is a need to render shadow effects using reduced data to represent stencil shadow volumes to ensure that the resources of a GPU, such as memory (e.g., cache memory), are used in an efficient manner.